From 40a926cc119602d05794c288e448819464d81ab4 Mon Sep 17 00:00:00 2001 From: robertl Date: Wed, 1 Jan 2003 02:25:19 +0000 Subject: [PATCH] Revert bad timezone fix in GPX. --- gpx.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gpx.c b/gpx.c index 030b4afdb..4ae86bbf5 100644 --- a/gpx.c +++ b/gpx.c @@ -371,10 +371,18 @@ gpx_end(void *data, const char *el) tm.tm_year -= 1900; tm.tm_isdst = 1; wpt_tmp->creation_time = mktime(&tm); +#if 0 /* mktime assumes local time, and Z is gmtime */ /* localtime will initialize timezone and daylight */ + /* 12/31/02 - RJL - unfortunately, this fix relies + * on non-ANSI extensions, so I've turned this off + * and reverted to the old way. + */ localtime( &wpt_tmp->creation_time ); wpt_tmp->creation_time -= timezone - (daylight?3600:0); +#else + wpt_tmp->creation_time = mktime(&tm); +#endif } if (in_wpt && in_gs_type && !in_gs_log) { wpt_tmp->gc_data.type = gs_mktype(cdatastr); -- 2.30.2